package com.yyq.adms.usermanage.pojo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.yyq.sos.pojo.BackBaseEntity;

@Entity
@Table(name = "ss_sys_roles")
public class SysRoles extends BackBaseEntity implements java.io.Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -2233851653302993277L;
	private String roleName;
	private String roleCname;
	private String sts;
	private Date stsTime;
	private Date createTime;
	private String remark;
	private boolean check;
	private boolean grant;
	
	
	public SysRoles(){}
	
	public SysRoles(Long roleId,String roleName,String roleCname,String sts,String remark){
		this.roleCname = roleCname;
		this.id = roleId;
		this.roleName = roleName;
		this.sts = sts;
		this.remark = remark;
	}
	
	public String toString() {
		StringBuffer str = new StringBuffer();
		str.append("\r\n角色ID="+this.id);
		str.append("\r\n;角色名称="+this.roleName);
		str.append("\r\n;角色中文名="+this.roleCname);
		str.append("\r\n;备注="+this.remark);
		str.append("\r\n;状态="+this.sts);
		return str.toString();
	}
	
	
	/**
	 * 对应数据库字段为: role_name
	**/
	@Column(name = "role_name", length = 20)
	public String getRoleName()
	{
		return roleName;
	}
	
	/**
	 * 对应数据库字段为: role_name
	**/
	public void setRoleName(String roleName)
	{
		this.roleName = roleName;
	}
	
	
	/**
	 * 对应数据库字段为: role_cname
	**/
	@Column(name = "role_cname", length = 60)
	public String getRoleCname()
	{
		return roleCname;
	}
	
	/**
	 * 对应数据库字段为: role_cname
	**/
	public void setRoleCname(String roleCname)
	{
		this.roleCname = roleCname;
	}
	
	
	/**
	 * 对应数据库字段为: sts
	**/
	@Column(name = "sts")
	public String getSts()
	{
		return sts;
	}
	
	/**
	 * 对应数据库字段为: sts
	**/
	public void setSts(String sts)
	{
		this.sts = sts;
	}
	
	@Column(name = "sts_time")
	public Date getStsTime() {
		return stsTime;
	}

	public void setStsTime(Date stsTime) {
		this.stsTime = stsTime;
	}

	@Column(name = "create_time")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * 对应数据库字段为: remark
	**/
	@Column(name = " remark")
	public String getRemark()
	{
		return remark;
	}
	
	/**
	 * 对应数据库字段为: remark
	**/
	public void setRemark(String remark)
	{
		this.remark = remark;
	}

	public int hashCode()
	{
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id.longValue() ^ (id.longValue() >>> 32));
		return result;
	}

	public boolean equals(Object obj)
	{
		if (this == obj) return true;
		if (obj == null) return false;
		if (getClass() != obj.getClass()) return false;
		final SysRoles other = (SysRoles) obj;
		if (id != other.id) return false;
		return true;
	}

	@Transient
	public boolean isCheck() {
		return check;
	}

	public void setCheck(boolean check) {
		this.check = check;
	}

	@Transient
	public boolean isGrant() {
		return grant;
	}

	public void setGrant(boolean grant) {
		this.grant = grant;
	}
	
	

}